package com.lwq.nacosuserservice.controller;


import com.lwq.nacosuserservice.pojo.User;
import com.lwq.nacosuserservice.service.UserService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: 陆
 * @Date: 2024/01/30/11:07
 * @Description:
 */

@Slf4j
@RestController
@RequestMapping("/user")
@Api( tags = "用户服务")
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping("/{id}")
    public User findUser(@PathVariable Long id){
        User user = userService.selectById(id);
        return  user;
    }
}
